import os, glob, random
class Convert:
    def save_latex(self, nroDoc, visto, considerando, resuelve):
    
	f = open(str(nroDoc) + '.tex', 'w+')
	#f = open( str(nroDoc) + '.tex', 'w')
	txt = "\documentclass[11pt]{article}"
	txt = txt +  '\n\n'
	txt = txt +  '\usepackage[large]{uncmembr}\n'
	txt = txt +  '\n\n'
	txt = txt +  '\\noAddress\n'
	txt = txt +  '\n\n'
	txt = txt +  '\\begin{document}\n'
	txt = txt +  '\n\n'
	txt = txt +  '\\begin{resolucion}{15}{23}{10}{08}\n'
	txt = txt +  '\n\n'
	txt = txt +  '\\begin{vistos}\n'
	txt = txt +  '\n\n'

	#Visto
	txt = txt +  '\item%\n'
	txt = txt +  visto
	txt = txt +  '\n\\end{vistos}\n'
	txt = txt +  '\n\n'
	
	#Considerando
	txt = txt +  '\\begin{considerandos}\n'
	txt = txt +  '\n'
	txt = txt +  '\item%\n'
	txt = txt +  considerando
	txt = txt +  '\n\\end{considerandos}\n'
	txt = txt +  '\n\n'
	
	#resuelve
	txt = txt +  '\\begin{articulos}\n'
	txt = txt +  '\n'
	txt = txt +  '\item%\n'
	txt = txt +  resuelve
	txt = txt +  '\n\\end{articulos}\n'
	txt = txt +  '\n\\end{resolucion}\n'
	txt = txt +  '\\end{document}\n'
	txt = txt +  '\n\n'

	f.write(txt)
	f.close()
